<div class="dux-page-header uk-clearfix">
    <div class="page-title">
        <a class="uk-button uk-button-primary" href="{url('index')}"> 用户列表</a>
    </div>
    <div class="page-action">
        <a class="uk-button uk-button-danger" href="javascript:location.reload();"><i class="fa fa-refresh"></i></a>
    </div>
</div>
<div class="uk-margin-top">
    <div class="uk-card uk-card-default uk-card-small dux-panel">
        <div class="uk-card-header">{$assignName}用户</div>
        <div class="uk-card-body">
            <form class="dux-form uk-form   uk-form-horizontal " data-dux="form-bind" method="post">
                <fieldset>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">角色</label>
                        <div class="uk-form-controls">
                            <select name="role_id" class="uk-form-field" data-dux="form-select" required>
                                <!--loop{$roleList as $vo}-->
                                <option value="{$vo.role_id}"
                                <!--if{ $vo['role_id'] == $info['role_id'] }--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">等级</label>
                        <div class="uk-form-controls">
                            <select name="grade_id" class="uk-form-field" data-dux="form-select" required>
                                <!--loop{$gradeList as $vo}-->
                                <option value="{$vo.grade_id}"
                                <!--if{ $vo['grade_id'] == $info['grade_id'] }--> selected <!--{/if}-->
                                >{$vo.name}</option>
                                <!--{/loop}-->
                            </select>
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">邮箱</label>
                        <div class="uk-form-controls">
                            <input type="text" name="email" value="{$info.email}" placeholder="请输入邮箱">
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">电话</label>
                        <div class="uk-form-controls">
                            <input type="text" name="tel" value="{$info.tel}" placeholder="请输入电话">
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">昵称</label>
                        <div class="uk-form-controls">
                            <input type="text" name="nickname" value="{$info.nickname}" placeholder="请输入昵称">
                        </div>
                    </div>
                    <div class="uk-form-group">
                        <label class=" uk-form-label">头像</label>
                        <div class="uk-form-controls">

                            <div class="uk-input-group">
                                <input class="uk-form-field" name="avatar" id="avatar" value="{$info.avatar}"
                                       placeholder="上传自定义头像">
                                        <span class="uk-input-group-btn">
                                            <button class="uk-button uk-button-default" type="button" data-dux="form-upload"
                                                    data-target="#avatar" data-type="jpg,png,bmp"><i
                                                    class="fa fa-upload"></i></button>
                                        </span>
                            </div>
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class=" uk-form-label">地区</label>
                        <div class="uk-form-controls" data-dux="form-location">

                            <div class="uk-grid uk-child-width-expand">
                                <div>
                                    <select name="province" data-province="{$info.province}"></select>
                                </div>
                                <div>
                                    <select name="city" data-city="{$info.city}"></select>
                                </div>
                                <div>
                                    <select name="region" data-district="{$info.region}"></select>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class=" uk-form-label">密码</label>
                        <div class="uk-form-controls">
                            <input class="uk-form-field" type="text" onfocus="this.type='password'" name="password" placeholder="不修改密码请留空" >
                        </div>
                    </div>

                    <div class="uk-form-group">
                        <label class=" uk-form-label">状态</label>
                        <div class="uk-form-controls uk-form-controls-text">
                            <?php $info['status'] = isset($info['status']) ? $info['status'] : 1;  ?><div class="uk-grid">
                            <label>
                                <!--if{$info['status']}-->
                                <input name="status" value="1" checked="checked" type="radio">
                                <!--{else}-->
                                <input name="status" value="1" type="radio">
                                <!--{/if}-->
                                正常
                            </label>
                            <label>
                                <!--if{!$info['status']}-->
                                <input name="status" checked="checked" value="0" type="radio">
                                <!--{else}-->
                                <input name="status" value="0" type="radio">
                                <!--{/if}-->
                                禁用
                            </label>
                        </div></div>
                    </div>
                    <div class="uk-form-group">
                        <div class="uk-form-controls">
                            <input type="hidden" name="user_id" value="{$info.user_id}">
                            <button class="uk-button uk-button-primary" type="submit" disabled>保存</button>
                        </div>
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
</div>